extends Node2D

var subtitles: Array = [
	"清晨",
	"合欢宗",
	"林长老： 啊啊啊~",
	"杂役5698！！！",
	"我院子里怎么有一滩水？？？\n你是怎么打扫的！",
	"我：啊？我昨晚明明打扫过了啊？",
	"林长老： 要你何用！这点事干不好！！！",
	"你已经被逐出师门了！",
	"自此，你找了个山头",
	"开宗立派",
]

var current_subtitle = 0  # 当前显示的字幕索引

func OnNext():
	current_subtitle = current_subtitle + 1
	
	if current_subtitle < len(subtitles):
		$Label.text = subtitles[current_subtitle]
	else:
		queue_free()
		pass

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	$Label.text = subtitles[0]
	$TextureButton.connect("button_down", OnNext)
	
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	pass
